const fullLoadingMinxin = {
  data() {
    return {
      loadingInstance: null
    }
  },
  methods: {
    // 打开全屏loading
    openFullLoading() {
      if (this.loadingInstance) return;
      this.loadingInstance = this.$loading({
        lock: true,
        text: '上传中，请稍后...',
      })
    },
    // 关闭全屏loading
    closeFullLoading() {
      if (!this.loadingInstance) return
      setTimeout(() => {
        this.loadingInstance.close();
        this.loadingInstance = null;
      }, 200)
    },
  },
}

export {
  fullLoadingMinxin
}